As a biomedical engineer, you are designing a wearable EMG device. One of the functions your device needs to perform is to measure the mean absolute value of the signal in real time. Assume the input is a sinewave.
What functions would you need to perform on your signal to obtain the mean absolute value?
The brief states the input is a sinewave, $x(t) = A\sin(\omega t)$. The mean absolute value is the time-average of $|x(t)|$ over a window $T$. For a sinewave with amplitude $A$ and a window that contains a whole number of half-cycles, the integral closes in form and the MAV settles to a constant.
For $x(t) = A\sin(\omega t)$, evaluating the integral gives $\mathrm{MAV} = \tfrac{2A}{\pi} \approx 0.637\,A$. The target value below is plotted as a dashed line so the chain output in later slides can be read against it.
The MAV equation is the composition of two operators: an absolute value on the instantaneous signal, and an integral over a finite window. Each maps to a standard analog block.
A rectified sinewave is a sum of a DC term equal to $\tfrac{2A}{\pi}$ and a Fourier series of even harmonics of $\omega$. Averaging, or low-pass filtering with cutoff well below $2\omega$, isolates that DC term.
A passive bridge of four diodes will rectify a sinewave, but each diode drop subtracts $V_D \approx 0.6$ V from the signal. EMG amplitudes are millivolts, so the diodes never turn on. A precision rectifier places the diode inside an op-amp feedback loop, dividing the diode drop by the open-loop gain so the output follows $|x(t)|$ down to nearly zero.
For a sinewave input $x(t) = A\sin(\omega t)$, the rectified output is
$|x(t)| \;=\; A\bigl|\sin(\omega t)\bigr| \;=\; \dfrac{2A}{\pi} \;-\; \dfrac{4A}{\pi}\!\sum_{k=1}^{\infty}\!\dfrac{\cos(2k\omega t)}{4k^{2}-1}$
The first term is the DC value the next stage must extract. The remaining terms are harmonics of $2\omega$, the lowest of which is at $2\omega$ itself. A low-pass filter with cutoff well below $2\omega$ removes them.
Averaging in continuous time is integration over a window. A first-order RC low-pass filter is the analog approximation: the output is a weighted moving average of the input with an exponential window of time constant $\tau = RC$ and cutoff $f_c = 1/(2\pi\tau)$.
The rectified signal is a DC term at $\tfrac{2A}{\pi}$ plus harmonics at $2\omega, 4\omega, \dots$. A first-order low-pass filter at cutoff $f_c$ has magnitude $|H(f)| = 1/\sqrt{1 + (f/f_c)^2}$. Choosing $f_c \ll 2f_\mathrm{sig}$ attenuates every harmonic; the DC term passes unchanged, so the filter output settles to $\tfrac{2A}{\pi}$, which is the MAV.
The two stages connect in series. The EMG sinewave enters the precision rectifier, the rectified signal feeds a first-order low-pass filter, and the filter output is the running mean absolute value. The chain is purely analog and runs continuously, so the output is available in real time without sampling or accumulation in software.
A myoelectric prosthetic hand is controlled by surface EMG from the residual limb. The raw signal is bipolar and noisy; the controller cannot use it directly. The MAV envelope is the quantity that correlates with voluntary contraction force, so the chain from the previous slide is what the device runs in real time.